<template>
  <div class="hk_all">
    <h3 class="tip">
      {{ $t("hkStock.hk_All.56hzvjc5vp40") }}
      <span class="tip_imp">{{ $t("hkStock.hk_All.56hzvjc5w680") }}</span
      >{{ $t("hkStock.hk_All.56hzvrtjokw0") }}
    </h3>
    <stock-all
      ref="industryList"
      :plateId="plateId"
      :sortList="hk_industry"
      type="HK"
      @ListClick="ListClick"
    ></stock-all>
  </div>
</template>
<script>
import stockAll from "@/components/stock/stock_all.vue";
export default {
  components: { stockAll },
  data() {
    return {
      hk_industry: {
        toggleShow: true,
        order: ["", "DESC", "ASC"],
        name: "order",
        url: "/market.v1/market/plateInfo", //主板 HK
        submit: {
          type: "HK",
          securityType: "1",
          plateId: "", // 板块id
          plateType: "1", // 板块类型 1：行业板块，2:概念板块
          field: "gain",
          order: "DESC",
          pageSize: "20",
          page: 1,
        },
      },
      plateId: "", // 用于判断id是否变化
    };
  },
  methods: {
    ListClick(isTrue) {
      this.$store.dispatch("SetHkActive", isTrue);
    },
  },
  created() {
    this.hk_industry.submit.plateId = this.$route.params.id;
    this.plateId = this.$route.params.id;
  },
  watch: {
    "$route.params.id"(val) {
      this.hk_industry.submit.plateId = val;
      this.hk_industry.submit.page = 1;
      this.plateId = this.$route.params.id;
    },
  },
};
</script>
<style lang="less">
.hk_all {
  .tip {
    color: @fbSix;
    font-size: 12px;
    line-height: 36px;
    .tip_imp {
      color: @hoverColor;
    }
  }
}
</style>
